home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / lang / fpcsrc.lha / fpc / compiler / systems.pas < prev    next >
Pascal/Delphi Source File  |  1998-09-24  |  16KB  |  551 lines

  1. {
  2.     $Id: systems.pas,v 1.2.2.3 1998/08/18 13:40:10 carl Exp $
  3.     Copyright (C) 1995,97 by Florian Klaempfl
  4.  
  5.     This unit contains informations about the target systems supported
  6.     (these are not processor specific)
  7.  
  8.     This program is free software; you can redistribute it and/or modify
  9.     it under the terms of the GNU General Public License as published by
  10.     the Free Software Foundation; either version 2 of the License, or
  11.     (at your option) any later version.
  12.  
  13.     This program is distributed in the hope that it will be useful,
  14.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.     GNU General Public License for more details.
  17.  
  18.     You should have received a copy of the GNU General Public License
  19.     along with this program; if not, write to the Free Software
  20.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22.  ****************************************************************************
  23. }
  24. unit systems;
  25.  
  26.   interface
  27.  
  28.     type
  29.        { target operanting system }
  30.        ttarget = (target_GO32V1,target_OS2,target_LINUX,
  31.                   target_WIN32,target_GO32V2,
  32.                   target_Amiga,target_Atari,target_Mac68k,
  33.                   target_PalmOS);
  34.  
  35.        tendian = (endian_little,en_big_endian);
  36.  
  37.  
  38.        ttargetinfo = record
  39.           target : ttarget;
  40.           target_name : string[30];
  41.           short_name : string[8];
  42.           unit_env : string[20];
  43.           system_unit : string[8];
  44.           exeext,
  45.           objext,
  46.           dllext,
  47.           unitext,
  48.           libext,
  49.           asmext,
  50.           sourceext,
  51.           pasext  : string[4];
  52.           newline : string[3];
  53.           labelprefix : string[2];
  54.           Cprefix : string[2];
  55.           use_function_relative_addresses : boolean;
  56.           endian : tendian;
  57.        end;
  58.  
  59.        tsourceinfo = record
  60.           source:ttarget;
  61.           source_name:string[30];
  62.           exeext,
  63.           scriptext : string[4];
  64.           endian : tendian;
  65.        end;
  66.  
  67.     var
  68.        source_info : tsourceinfo;
  69.        target_info : ttargetinfo;
  70.  
  71.     function set_string_target(const s : string) : boolean;
  72.  
  73.   implementation
  74.  
  75.     const
  76.        target_infos : array[ttarget] of ttargetinfo = (
  77.           (
  78.             target : target_GO32V1;
  79.             target_name : 'GO32 V1 DOS extender';
  80.             short_name : 'GO32V1';
  81.             unit_env : 'GO32V1UNITS';
  82.             system_unit : 'SYSTEM';
  83.             exeext : '';
  84.             objext : '.O1';
  85.             dllext : '.DLL';
  86.             unitext : '.PP1';
  87.             libext : '.PPL';
  88.             asmext : '.S1';
  89.             sourceext : '.PP';
  90.             pasext : '.PAS';
  91.             newline : #13#10;
  92.             labelprefix : '.L';
  93.             Cprefix : '_';
  94.             use_function_relative_addresses : true;
  95.             endian : endian_little
  96.           ),
  97.           (
  98.             target : target_OS2;
  99.             target_name : 'OS/2 (32 bit)';
  100.             short_name : 'OS2';
  101.             unit_env : 'OS2UNITS';
  102.             system_unit : 'SYSOS2';
  103.             exeext : '.exe';
  104.             objext : '.oo2';
  105.             dllext : '.dll';
  106.             unitext : '.ppo';
  107.             libext : '.ppl';
  108.             asmext : '.so2';
  109.             sourceext : '.pas';
  110.             pasext : '.pp';
  111.             newline : #13#10;
  112.             labelprefix : 'L';
  113.             Cprefix : '_'; {???}
  114.             use_function_relative_addresses : true;
  115.             endian : endian_little
  116.           ),
  117.           (
  118.             target : target_LINUX;
  119.             target_name : 'Linux';
  120.             short_name : 'LINUX';
  121.             unit_env : 'LINUXUNITS';
  122.             system_unit : 'syslinux';
  123.             exeext : '';
  124.             objext : '.o';
  125.             dllext : '.so';
  126.             unitext : '.ppu';
  127.             libext : '.ppl';
  128.             asmext : '.s';
  129.             sourceext : '.pp';
  130.             pasext : '.pas';
  131.             newline : #10;
  132.             labelprefix : '.L';
  133.             Cprefix : '';
  134.             use_function_relative_addresses : true;
  135.             endian : endian_little
  136.           ),
  137.           (
  138.             target : target_WIN32;
  139.             target_name : 'Win32';
  140.             short_name : 'WIN32';
  141.             unit_env : 'WIN32UNITS';
  142.             system_unit : 'SYSWIN32';
  143.             exeext : '.exe';
  144.             objext : '.o';
  145.             dllext : '.dll';
  146.             unitext : '.ppw';
  147.             libext : '.ppl';
  148.             asmext : '.s';
  149.             sourceext : '.pp';
  150.             pasext : '.pas';
  151.             newline : #13#10;
  152.             labelprefix : '.L';
  153.             Cprefix : '_'; {???}
  154.             use_function_relative_addresses : true; {????}
  155.             endian : endian_little
  156.           ),
  157.           (
  158.             target : target_GO32V2;
  159.             target_name : 'GO32 V2.0 DOS extender';
  160.             short_name : 'GO32V2';
  161.             unit_env : 'GO32V2UNITS';
  162.             system_unit : 'SYSTEM';
  163.             exeext : '.EXE';
  164.             objext : '.O';
  165.             dllext : '.DLL';
  166.             unitext : '.PPU';
  167.             libext : '.PPL';
  168.             asmext : '.S';
  169.             sourceext : '.PP';
  170.             pasext : '.PAS';
  171.             newline : #13#10;
  172.             labelprefix : '.L';
  173.             Cprefix : '_'; {???}
  174.             use_function_relative_addresses : true;
  175.             endian : endian_little
  176.           ),
  177.           (
  178.             target : target_Amiga;
  179.             target_name : 'Commodore Amiga';
  180.             short_name : 'AMIGA';
  181.             unit_env : '';
  182.             system_unit : 'sysamiga';  { case sensitive }
  183.             exeext : '';
  184.             objext : '.o';
  185.             dllext : '.library';
  186.             unitext : '.ppa';
  187.             libext : '.ppl';
  188.             asmext : '.asm';
  189.             sourceext : '.pp';
  190.             pasext : '.pas';
  191.             newline : #10;
  192.             labelprefix : '.L';
  193.             Cprefix : '_'; {???}
  194.             use_function_relative_addresses : true;
  195.             endian : endian_little
  196.           ),
  197.           (
  198.             target : target_Atari;
  199.             target_name : 'Atari ST/STE';
  200.             short_name : 'ATARI';
  201.             unit_env : '';
  202.             system_unit : 'SYSATARI';
  203.             exeext : '.ttp';
  204.             objext : '.o';
  205.             dllext : '.dll';
  206.             unitext : '.PPT';
  207.             libext : '.PPL';
  208.             asmext : '.s';
  209.             sourceext : '.pp';
  210.             pasext : '.pas';
  211.             newline : #13#10;
  212.             labelprefix : '.L';
  213.             Cprefix : '_'; {???}
  214.             use_function_relative_addresses : true;
  215.             endian : endian_little
  216.           ),
  217.           (
  218.             target : target_Mac68k;
  219.             target_name : 'Macintosh m68k';
  220.             short_name : 'MAC OS';
  221.             unit_env : '';
  222.             system_unit : 'sysmac';    { case sensitive }
  223.             exeext : '';
  224.             objext : '.o';
  225.             dllext : '.dll';
  226.             unitext : '.ppm';
  227.             libext : '.ppl';
  228.             asmext : '.asm';
  229.             sourceext : '.pp';
  230.             pasext : '.pas';
  231.             newline : #13;
  232.             labelprefix : '__L';{ only ascii A..Z,a..z or _ allowed as first }
  233.             Cprefix : ''; {???}
  234.             use_function_relative_addresses : true;
  235.             endian : endian_little
  236.           ),
  237.           (
  238.             target : target_PalmOS;
  239.             target_name : 'PalmOS';
  240.             short_name : 'PALMOS';
  241.             unit_env : '';
  242.             system_unit : 'SYSPALM';
  243.             exeext : '.prc';
  244.             objext : '.o';
  245.             dllext : '.dll';
  246.             unitext : '.PPU';
  247.             libext : '.PPL';
  248.             asmext : '.s';
  249.             sourceext : '.pp';
  250.             pasext : '.pas';
  251.             newline : #13#10;
  252.             labelprefix : '.L';
  253.             Cprefix : '';
  254.             use_function_relative_addresses : true;
  255.             endian : endian_little
  256.           )
  257.        );
  258.  
  259.        source_infos : array[ttarget] of tsourceinfo = (
  260.           (
  261.             source : target_GO32V1;
  262.             source_name : 'GO32 V1 DOS extender';
  263.             exeext : '.EXE';
  264.             scriptext : '.BAT';
  265.             endian : endian_little
  266.           ),
  267.